# This file is part of BlackArch Linux ( https://www.blackarch.org/ ).
# See COPYING for license details.

pkgname=habu
pkgver=359.8326936
pkgrel=6
pkgdesc='Python Network Hacking Toolkit.'
groups=('blackarch' 'blackarch-scanner' 'blackarch-spoof' 'blackarch-dos'
        'blackarch-cracker' 'blackarch-dos')
arch=('any')
url='https://github.com/portantier/habu'
license=('custom:unknown')
depends=('python' 'python-requests' 'python-argparse' 'python-requests-cache'
         'python-click' 'python-delegator.py' 'python-beautifulsoup4'
         'python-scapy')
makedepends=('git' 'python-setuptools')
source=("git+https://github.com/portantier/$pkgname.git")
sha512sums=('SKIP')

pkgver() {
  cd $pkgname

  echo $(git rev-list --count HEAD).$(git rev-parse --short HEAD)
}

build() {
  cd $pkgname

  python setup.py build
}

package() {
  cd $pkgname

  python setup.py install --root="$pkgdir" --skip-build

  install -Dm 644 -t "$pkgdir/usr/share/doc/$pkgname/" README.rst todo.rst
  install -Dm 644 LICENSE "$pkgdir/usr/share/licenses/$pkgname/LICENSE"
}

